Skip to content

Enable inline autofill - #1110

Open
JFronny wants to merge 9 commits into
Julow:masterfrom
JFronny:inline-autofill
Open

JFronny wants to merge 9 commits into
Julow:masterfrom
JFronny:inline-autofill

Conversation

@JFronny

@JFronny JFronny commented Sep 29, 2025

Copy link
Copy Markdown
Contributor

Since Android 11, Android allows keyboards to display autofill suggestions inline instead of trying to show a popup.
Based on some code in AnySoftKeyboard, this PR introduces support for that feature here.

To do so, I had to modify the default keyboard layout to include a scrollable view in which the components provided by the framework are displayed. I based this on the layout for the emoji pane, but I must admit that I'm not completely happy with the comparatively large number of additional layout bits the java code now needs to keep track of.
(I could have also tried to reimplement their behavior manually, but that seemed overly complicated).

If you have an idea for a better approach the layout and its handling could be modified to take, please suggest it. It has been quite a while since I wrote any android UI stuff without compose, so I'm almost certain I forgot about something.

I set an android:background on the wrapping layout element in an attempt to get keyboard background opacity to work, which seems to have been successful, but I only really tried it in the keyboard app and the browser, both of which have a single-color background, so if you have another app with a more colorful background to try this with, that would be appreciated.

With that said, this implementation of the feature does seem to work quite well in the emulator.

@Julow Julow left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Do you have examples of apps that send autofills that I can test ?

Comment thread srcs/juloo.keyboard2/Keyboard2.java Outdated
Comment thread srcs/juloo.keyboard2/Keyboard2.java Outdated
Comment thread srcs/juloo.keyboard2/Keyboard2.java Outdated
Comment thread srcs/juloo.keyboard2/Keyboard2.java Outdated
Comment thread res/layout/keyboard.xml Outdated
@sdrapha

sdrapha commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

Awesome! Do you have examples of apps that send autofills that I can test ?

Bitwarden is one.
Most likely, all other passwd managers should have similar functionality.

@JFronny

JFronny commented Oct 1, 2025

Copy link
Copy Markdown
Contributor Author

I used this test page with KeePassDX to quickly validate changes in Chrome and Firefox.

@Julow Julow left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I could test with KeePassDX

Comment thread srcs/juloo.keyboard2/InlineAutofill.java Outdated
Comment thread srcs/juloo.keyboard2/InlineAutofill.java Outdated
@JFronny

JFronny commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

Sorry for taking so long with this, I kind of forgot the PR even existed.
I have now updated it to merge your changes and attempted to implement your suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants